function [ fy, fx ] = get_spice_fq( amiga_model, audio_filter_mode )

fs = get_sampling_fq();

if strcmpi(audio_filter_mode, 'unfiltered')
    
    fq2 = linspace(fix(-fs/2), fix(fs/2), fs-1);
    fq2 = fftshift(fq2);

    fy = ones(1, size(fq2, 2));

    if (nargout == 2)
        fx = fq2;
    end
    
    return;

end

if (strcmpi(amiga_model, 'a500'))
    if (strcmpi(audio_filter_mode, 'led filter on'))
        file = 'LTspice/a500 #1 filter on.csv';
    elseif (strcmpi(audio_filter_mode, 'led filter off'))
        file = 'LTspice/a500 #1 filter off.csv';
    else
        error('unsupported filter mode');
    end
elseif (strcmpi(amiga_model, 'a1200'))
    if (strcmpi(audio_filter_mode, 'led filter on'))
        file = 'LTspice/a1200 #1 filter on.csv';
    elseif (strcmpi(audio_filter_mode, 'led filter off'))
        file = 'LTspice/a1200 #1 filter off.csv';
    else
        error('unsupported filter mode');
    end
else
    error('bad filter name');
end

csv = importdata(file);
data = csv.data;

fq1 = data(:,1)';
fabs1 = data(:,2)';
fangle1 = data(:,3)';

fq2 = linspace(fix(-fs/2), fix(fs/2), fs-1);
fq2 = fftshift(fq2);
fabs2 = interp1(fq1, fabs1, fq2, 'cubic');
fangle2 = interp1(fq1, fangle1, fq2, 'cubic');

fy = fabs2.*exp(1i*fangle2);

fy(end:-1:size(fy, 2)/2+1) = fy(1:1:size(fy,2)/2);
fy = fy / max(abs(fy));

if (nargout == 2)
    fx = fq2;
end

end

